<?php
$this->widget('admin.components.widgets.AlertWidget');
$form=$this->beginWidget('CActiveForm', array(
    'id'=>'manager-form',
    'enableClientValidation'=>true,
    'clientOptions'=>array(
        'validateOnSubmit'=>true,
    ),
    //'enableAjaxValidation'=>true,
    'htmlOptions' => array('class' => 'da-form')
)); ?>
<div class="da-form-inline" style="margin-top: 20px;">
    <div class="da-form-row">
        <div class="da-form-col-3-8">
            <?php echo $form->labelEx($model,'phone'); ?>
            <div class="da-form-item large">
                <?php echo $form->textField($model,'phone',array('maxlength'=>255)); ?>
                <?php echo $form->error($model,'phone');?>
            </div>
        </div>
    </div>
    <div class="da-form-row">
        <div class="da-form-col-3-8">
            <?php echo $form->labelEx($model,'password'); ?>
            <div class="da-form-item large">
                <?php echo $form->textField($model,'password',array('maxlength'=>32)); ?>
                <?php echo $form->error($model,'password');?>
            </div>
        </div>
    </div>
    <?php if($this->manager->id != $model->id):?>
    <div class="da-form-row">
        <div class="da-form-col-3-8">
            <?php echo $form->labelEx($model,'status'); ?>
            <div class="da-form-item large">
                <?php echo $form->dropDownList($model, 'status', $this->manager->statusDataByLevel); ?>
                <?php echo $form->error($model,'status');?>
            </div>
        </div>
    </div>
    <?php else:?>
    <div class="da-form-row">
        <div class="da-form-col-3-8">
            <?php echo $form->labelEx($model,'status'); ?>
            <div class="da-form-item large">
                <?php echo $model->statusLabel;?>
            </div>
        </div>
    </div>
    <?php endif?>
    
    
    <div class="da-form-row">
        <div class="da-form-col-3-8">
            <?php echo $form->labelEx($model,'name'); ?>
            <div class="da-form-item large">
                <?php echo $form->textField($model,'name',array('maxlength'=>255)); ?>
                <?php echo $form->error($model,'name');?>
            </div>
        </div>
    </div>
    <div class="da-form-row">
        <div class="da-form-col-3-8">
            <?php echo $form->labelEx($model,'address'); ?>
            <div class="da-form-item large">
                <?php echo $form->textField($model,'address',array('maxlength'=>255)); ?>
                <?php echo $form->error($model,'address');?>
            </div>
        </div>
    </div>
    <div class="da-form-row">
        <div class="da-form-col-2-8">
            <div class="da-form-item large">
                <input type="submit" class="da-button blue" value="<?php echo ($model->isNewRecord) ? 'Thêm' : 'Cập nhật';?>">
            </div>
        </div>
    </div>
</div>
<?php $this->endWidget(); ?>